//    Copyright (C) Kherty.  All rights reserved.
using OpenLS.Core.Serialization;

namespace OpenLS.Drawing
{
    internal class AlphaOutsetEffect : Effect
    {
        private int rad;

        public int Radius
        {
            get { return rad; }
            set { rad = value; }
        }

        internal override void ReadXmlCore(ReadContext context)
        {
            using (var c = context.Read("alphaOutset"))
            {
                Radius = c.GetOptionalInteger("rad", 0);
            }
        }

        internal override void WriteXmlCore(WriteContext context)
        {
            using (WriteContext c = context.Write("alphaOutset"))
            {
                c.SetOptionalInteger("rad", Radius, 0);
            }
        }
    }
}